<template>
	<view class="home">

		
		<view class="hello"
			style="background-color: #fff;height: 160rpx;display: flex;align-items: center;padding-top: 100rpx;padding-bottom: 20rpx;padding-left: 20rpx;font-weight: 700;">
			<text>您好</text>，<text>{{user}}</text>!
		</view>
		<view class="home-header">
			<image src="../../static/bg05.jpg" mode="" style="height: 370rpx;width: 100%;"></image>
		</view>
		<view class=""
			style="background-color: #fff;min-height: 100rpx;display: flex;align-items: center;justify-content:space-between;padding: 0 10rpx;">
			
			<view class="" style="padding:0 40rpx;">
				<image src="../../static/db.svg" mode="" style="width: 80rpx;height: 80rpx;"></image>
			</view>
			<view class="" style="flex:1;display: flex;overflow: auto;">
				<view class="" style="display: flex;">
					<navigator url="../beforeOrder/beforeOrder" open-type="navigate" hover-class="other-navigator-hover" >
						<text style="font-size: 32rpx;font-weight: 700;color: #1095cd;">{{num1}}</text>
						<text style="font-size: 28rpx;">订单录入</text>
						
					</navigator>
				</view>
			</view>
		</view>
		<view class="" style="flex: 1;overflow: auto;">
			
			<!-- 订单管理 -->
			<view class="home-container-title">
				订单管理
			</view>
			<view class="home-container">
				<view class="home-container-item" @click="toLink1">
					<image src="../../static/01.svg"></image>
					<text>订单录入</text>
				</view>
				<view class="home-container-item" @click="toLink2">
					<image src="../../static/03.svg"></image>
					<text>订单查询</text>
				</view>
			</view>
			
			<!-- 综合查询 -->
			<view class="home-container-title">
				综合查询
			</view>
			<view class="home-container">
				<view class="home-container-item" @click="toLink3">
					<image src="../../static/15.svg"></image>
					<text>报告查询</text>
				</view>
			</view>
		</view>
		<view class=""
			style="font-size: 24rpx;color: rgba(35,39,55,.3);display: flex;align-items: center;justify-content: center;width: 100%;height: 60rpx;margin-bottom: 10rpx;">
			北京三维天地提供技术支持
		</view>

	</view>
</template>

<script>

	import baseUrl from '../../utils/config.js'
	
	export default {
		
		data() {
			return {
				user: uni.getStorageSync('userName'),
				num1: "", // 订单录入数量
			}
		},
		onLoad(options) {},
		onShow() {
			// 查订单的数量的接口
			this.getNumber()
		},
		methods: {
			toLink1(v) {
				uni.navigateTo({
					url: '../beforeOrder/beforeOrder'
				})
			},
		
			toLink2(v) {
				uni.navigateTo({
					url: '../orderView/orderView'
				})
			},

			toLink3(v) {
				uni.navigateTo({
					url: '../reportSearch/reportSearch'
				})
			},
			
			// 查订单的数量的接口
			getNumber(){
				uni.request({
					url: baseUrl + "batch/batch-count",
					data: {
						userId: uni.getStorageSync('userId'),
						batchStatus: "未提交",
					},
					//formdate格式
					header: {
						"Content-Type": "application/json",
						'token': uni.getStorageSync('token')
					},
					method: "POST",
					success: (res) => {
						if (res.data.status == 200) {
							// console.log('订单录入未提交数量',res.data.data)
							this.num1 = res.data.data.count
						}
					},
				})
			},
		
		},
		watch: {
		},
		onHide() {

		}
	}
</script>

<style lang="scss">

	::-webkit-scrollbar {
	  width: 0;
	  height: 0;
	  color: transparent;
	}

	navigator{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		width: 200rpx;
		color: rgba(35, 39, 55, 0.9);
	}
	.daiban {
		// margin-right: 40rpx;
		display: flex;
		flex-direction: column;
		// margin-left: 100rpx;
		align-items: center;
		// justify-content: center;
		width: 200rpx;
	}


	.home {
		width: 100vw;
		height: 100vh;
		overflow-y: auto;
		display: flex;
		flex-direction: column;

		// position: relative;
		background-color: #f0f0f0;

		&-header {
			height: 370rpx;
			// background-image: linear-gradient(to bottom, #1ac5b3, #109dca);
			display: flex;
			// padding-left: 50rpx;
			// padding-right: 50rpx;

			swiper {
				width: 600rpx;
				border-radius: 30rpx;
				height: 300rpx;
				position: fixed;
				top: 50rpx;


				image {
					width: 100%;
					height: 100%;
				}
			}

			&-tx image {
				width: 100rpx;
				height: 100rpx;
			}

			&-info {
				display: flex;
				flex-direction: column;
				color: white;
				margin-left: 16rpx;

				&-name {
					font-size: 36rpx;
					letter-spacing: 2rpx;
				}

				&-id {
					font-size: 28rpx;
					color: #72c9dc;
					margin-top: 16rpx;
				}
			}
		}

		&-container {
			display: flex;
			flex-wrap: wrap;


			text-align: justify;

			background-color: #fff;

			&::after {
				content: '';
				width: 25%;
			}

			&-title {
				color: rgba(35, 39, 55, 0.7);
				min-height: 60rpx;
				display: flex;
				align-items: center;
				margin-left: 40rpx;
				font-size: 30rpx;
			}

			// flex: 1;
			// height: 400rpx;
			align-items: center;

			&-item {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;

				width: 25%;
				height: 180rpx;
				position: relative;


				text {
					color: rgba(35, 39, 55, .9);
					font-size: 30rpx;
				}

			}

			image {
				width: 80rpx;
				height: 80rpx;
			}
		}

		&-foot {
			height: 80rpx;
			display: flex;
			justify-content: center;
			align-items: center;
		}
		.icon-box{
			width: 80rpx;
			height: 80rpx;
			border-radius: 50%;
			background-color: #red;
		}
	}
</style>
